person1 = {'name': 'Anna', 'salary': 5000}
person2 = {'name': 'Lil', 'salary': 3000}
person3 = {'name': 'Ser', 'salary': 8000}
person4 = {'name': 'Hua', 'salary': 7000}

person_list = [person1, person2, person3, person4]

raise_salary = [emp['salary'] + 200 if emp['salary'] > 5000 else emp['salary'] + 500 for emp in person_list]

print(raise_salary)